function Game(){
	"use strict";
}

Game.fps = 60;

Game.updatingTime = 0;
Game.renderingTime = 0;

// Initialize and start game
Game.start = function() {
	"use strict";
	//
	// Initialize GUI
    Game.gui = new Gui();
	//
	// Initialize Input Handler
    Game.inputHandler = new InputHandler();
	//
	// Initialize model
    Game.model = new Model();
	Game.model.initialize("Map0001");
	//
	// Initialize renderer
    Game.renderer = new Renderer();
	//
	// Starts animations
    Game.refresh();
};

// Loop game logic
Game.refresh = function() {
	"use strict";
	var t0,t1,t2;
	// update 
	t0 = Date.now();
	Game.update();
	//
	// render
	t1 = Date.now();
	Game.render();
	//
	// compute times
	t2 = Date.now();
	Game.updatingTime = t1-t0;
	Game.renderingTime = t2-t1;
	//
	//schedule next refresh
    window.setTimeout(Game.refresh, 1000 / Game.fps - Game.updatingTime - Game.renderingTime);
};

// Update game models
Game.update = function() {
	"use strict";
	Game.model.update();
	Game.gui.cammera.update();
};

// Update game GUI components
Game.render = function() {
	"use strict";
	Game.renderer.render();
};
